package com.km.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class ThymeleafController {
	private static Logger logger=LoggerFactory.getLogger(ThymeleafController.class);
	@GetMapping(value="/thyme")
	public String thyme(Model model){
		logger.info("进入thyme方法");
		model.addAttribute("test","teest");
		return "thymeleaf";
	}
	@GetMapping(value="/index")
	public String index(Model model){
		return "index";
	}
	@GetMapping(value="/redi")
	public String redirect(){
		logger.info("进入redirect方法");
		return "redirect:thyme";
	}
}
